package com.halixun.d2app.adapter.holder;

import android.view.View;
import android.widget.TextView;

import com.halixun.d2app.R;
import com.halixun.d2app.base.BaseViewHolder;
import com.halixun.d2app.bean.QingDanInfo;

/**
 * @ProjectName: D2App
 * @Package: com.halixun.d2app.adapter.holder
 * @ClassName: QingDanViewHolder
 * @Description: java类作用描述
 * @Author: hdx
 * @CreateDate: 2019/12/5 18:31
 * @UpdateUser: hdx
 * @UpdateDate: 2019/12/5 18:31
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class QingDanViewHolder extends BaseViewHolder<QingDanInfo> {

    private TextView order,name,number,totalPrice;

    public QingDanViewHolder(View itemView) {
        super(itemView);
        initView();
    }

    private void initView() {
        order = itemView.findViewById(R.id.order);
        name = itemView.findViewById(R.id.name);
        number = itemView.findViewById(R.id.number);
        totalPrice = itemView.findViewById(R.id.totalPrice);
    }

    @Override
    public void setLayoutInfo(QingDanInfo info) {
        order.setText((getLayoutPosition()+1)+"");
        name.setText(info.getFoodName());
        number.setText(info.getSaleNum()+"");
        totalPrice.setText(info.getSaleMoney()+"");
    }
}
